@echo off
setlocal

set OUT=.\config\version.h

hg identify > temp.txt
set /p VERSION= < temp.txt
del temp.txt


echo // This file is automatically generated, do not change! > %OUT%
echo #ifndef VERSION_H_ >>  %OUT%
echo #define VERSION_H_ >> %OUT%
echo. >> %OUT%
echo. >> %OUT%
echo #define VERSION "%VERSION%" >> %OUT%
echo. >> %OUT%
echo. >> %OUT%
echo #endif >> %OUT%
endlocal